import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
import { MenuItem } from '@iux/live';

@Component({
  templateUrl: './position.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
  styles: [`
    .lv-button {
      width: 130px;
    }
  `],
})
export class PositionComponent implements OnInit {
  menus: MenuItem[];

  ngOnInit(): void {
    this.menus = this.getMenus();
  }

  getMenus(): MenuItem[] {
    const data = [
      {
        title: 'group1',
        id: '1',
        label: 'Item 01',
      },
      {
        id: '2',
        label: 'Item 02',
      },
      {
        title: 'group2',
        id: '3',
        label: 'Item 03',
      },
      {
        id: '4',
        label: 'Item 04',
      },
    ];
    return data;
  }
}
